﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using VisualStudioProvider;
using System.IO;

namespace BuildSweeper
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Sweeping project files");

            //Debugger.Break();

            var solutionPath = args[0];

            var solution = new VSSolution(Path.Combine(solutionPath, "SolutionFramework.sln"));

            Console.WriteLine("Analyzing solution: " + solution.Name);

            foreach (VSProject project in solution.Projects.OrderBy(p => p.Name))
            {
                Console.WriteLine("Analyzing project: " + project.Name);

                foreach (VSProjectItem item in project.Items)
                {
                    if (item.ItemType == "Reference")
                    {
                        if (item.HasMetadata)
                        {
                            foreach (var metaData in item.Metadata)
                            {
                                if (metaData.Name == "HintPath")
                                {

                                }
                            }
                        }
                    }
                    else if (item.ItemType == "Compile")
                    {

                    }
                }
            }

            Console.Read();
        }
    }
}
